﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace Drive.LiveChat.Server
{
    public class JSON
    {

        static JsonSerializerSettings serializerSettings = new JsonSerializerSettings
        {
            ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver()
        };
        public static T Parse<T>(string json)
        {
            return JsonConvert.DeserializeObject<T>(json);
        }

        public static string Stringify(object d)
        {
            return JsonConvert.SerializeObject(d, Formatting.None, serializerSettings);
        }
    }
}
